package com.ruoyi.market.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;

/**
 * 服务项目对象 project
 * 
 * @author ruoyi
 */
public class Project extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 服务项目ID */
    private Long projectId;

    /** 服务项目父级ID */
    private Long parentId;

    /** 店铺ID */
    private String shopId;

    /** 随机单是否可用状态（Y-是 N-否） */
    private String isAble;

    /** 启用状态（0正常 1停用） */
    @Excel(name = "启用状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 排序 */
    @Excel(name = "排序")
    private Long projectSort;

    /** 服务项目标题 */
    @Excel(name = "服务项目标题")
    private String projectTitle;

    /** 服务项目详情 */
    @Excel(name = "服务项目详情")
    private String projectContent;

    /** 服务项目简介 */
    @Excel(name = "服务项目简介")
    private String projectDescription;

    /** 服务项目标签 */
    @Excel(name = "服务项目标签")
    private String projectTag;

    /** 累计下单人数 */
    @Excel(name = "累计下单人数")
    private int orderNumber;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 所属店铺信息   */
    private ConfigBase shopInfo;

    private List<Project> children = new ArrayList<Project>();

    public Project()
    {

    }

    public Project(Long projectId)
    {
        this.projectId = projectId;
    }

    public Long getProjectId()
    {
        return projectId;
    }

    public void setProjectId(Long projectId)
    {
        this.projectId = projectId;
    }

    public String getShopId(){ return shopId; }

    public void setShopId(String shopId){ this.shopId = shopId; }

    public Long getParentId(){ return parentId; }

    public void setParentId(Long parentId){ this.parentId = parentId; }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getIsAble()
    {
        return isAble;
    }

    public void setIsAble(String isAble)
    {
        this.isAble = isAble;
    }

    @NotBlank(message = "名称不能为空")
    public String getProjectTitle(){ return projectTitle;}

    public void setProjectTitle(String projectTitle){ this.projectTitle = projectTitle; }

    public String getProjectContent(){ return projectContent;}

    public void setProjectContent(String projectContent){ this.projectContent = projectContent; }

    public Long getProjectSort(){ return projectSort;}

    public void setProjectSort(Long projectSort){ this.projectSort = projectSort; }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public List<Project> getChildren()
    {
        return children;
    }

    public void setChildren(List<Project> children)
    {
        this.children = children;
    }

    public ConfigBase getShopInfo()
    {
        return shopInfo;
    }

    public void setShopInfo(ConfigBase shopInfo)
    {
        this.shopInfo = shopInfo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("projectId", getProjectId())
            .append("shopId", getShopId())
            .append("parentId", getParentId())
            .append("status", getStatus())
            .append("isAble", getIsAble())
            .append("projectTitle", getProjectTitle())
            .append("projectContent", getProjectContent())
            .append("projectSort", getProjectSort())
            .append("delFlag", getDelFlag())
            .append("shopInfo", getShopInfo())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
